import React from "react";
import ReactDOM from "react-dom/client";
class App extends React.Component{
    constructor() {
        super();
        console.log("1-constructor");
    }
    UNSAFE_componentWillMount() {
        console.log("2-UNSAFE_componentWillMount")
    }

    render(){
        console.log("3-render")
        return (
            <div>
                <h3>App</h3>
            </div>
        )
    }
    componentDidMount() {
        console.log("4-componentDidMount")
    }
}
// 创建React容器
const root = ReactDOM.createRoot(document.querySelector("#root"));
root.render((
    <App/>
))
